//本地测试双向绑定数据
DZApp.controller('version_new',function($scope,$http){

    $scope.shanchu = function(index){
        //删除选定的对象
        $scope.mynews.splice($scope.currentIndex,1);
    };

	$http({
		method: 'POST',
		url: '/appserver/manage/appVersion/AppVersionSelect',
		data: $.param({version_code:'3123',os_type:'OS',description:'挺好',release_time:'2016-08-09',support_os_vers:'支持',download_url:'www.baidu.com',valid_flag:'有效'}),
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'
		},
		cache: false
	}).success(function(data) {
		console.log(data);
		$scope.mynews = data.data
	});
    
    
    $scope.baocun = function(){

    	$http({
			method: 'POST',
			url: '/appserver/manage/appVersion/AppVersionAdd',
			data: $.param($scope.Addversion),
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'
			},
			cache: false
		}).success(function(data) {
            console.log(data);
            $scope.Addversion = data.data
		});
    }


});

